package com.bjqh.edu.Bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2017/9/28.
 */

public class User implements Parcelable {


    /**
     * msg : success
     * user : {"total":"","sex":0,"weight":"","cardimg":"","nickname":"两句额我","cardnum":"","rname":"","sessionid":"14F6B1654B7C6A692AE3AFEDD2EB5A07","passWord":"e10adc3949ba59abbe56e057f20f883e","header":"/sys/header//1509097710417.jpg","intro":"","rows":"","course":"9,10,14","id":6,"time":1507710753000,"school":"清华大学","invitecode":"","rid":"","page":"","age":111,"name":"马林","role":1,"grade":"","gradeid":7,"teacher":{"id":6,"tcard":"2222","recimg":"","status":1,"stars":"","ptime":"阿道夫","tcardimg":"","qq":"111","intro":"嗯嗯"},"mobile":"15552584830"}
     * status : 200
     */

    private String msg;
    private UserBean user;
    private int status;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public static class UserBean implements Parcelable {
        /**
         * total :
         * sex : 0
         * weight :
         * cardimg :
         * nickname : 两句额我
         * cardnum :
         * rname :
         * sessionid : 14F6B1654B7C6A692AE3AFEDD2EB5A07
         * passWord : e10adc3949ba59abbe56e057f20f883e
         * header : /sys/header//1509097710417.jpg
         * intro :
         * rows :
         * course : 9,10,14
         * id : 6
         * time : 1507710753000
         * school : 清华大学
         * invitecode :
         * rid :
         * page :
         * age : 111
         * name : 马林
         * role : 1
         * grade :
         * gradeid : 7
         * teacher : {"id":6,"tcard":"2222","recimg":"","status":1,"stars":"","ptime":"阿道夫","tcardimg":"","qq":"111","intro":"嗯嗯"}
         * mobile : 15552584830
         */

        private String total;
        private int sex;
        private String weight;
        private String cardimg;
        private String nickname;
        private String cardnum;
        private String rname;
        private String sessionid;
        private String passWord;
        private String header;
        private String intro;
        private String rows;
        private String course;
        private int id;
        private long time;
        private String school;
        private String invitecode;
        private String rid;
        private String page;
        private int age;
        private String name;
        private int role;
        private String grade;
        private Integer gradeid;
        private TeacherBean teacher;
        private String mobile;

        public String getTotal() {
            return total;
        }

        public void setTotal(String total) {
            this.total = total;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public String getWeight() {
            return weight;
        }

        public void setWeight(String weight) {
            this.weight = weight;
        }

        public String getCardimg() {
            return cardimg;
        }

        public void setCardimg(String cardimg) {
            this.cardimg = cardimg;
        }

        public String getNickname() {
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getCardnum() {
            return cardnum;
        }

        public void setCardnum(String cardnum) {
            this.cardnum = cardnum;
        }

        public String getRname() {
            return rname;
        }

        public void setRname(String rname) {
            this.rname = rname;
        }

        public String getSessionid() {
            return sessionid;
        }

        public void setSessionid(String sessionid) {
            this.sessionid = sessionid;
        }

        public String getPassWord() {
            return passWord;
        }

        public void setPassWord(String passWord) {
            this.passWord = passWord;
        }

        public String getHeader() {
            return header;
        }

        public void setHeader(String header) {
            this.header = header;
        }

        public String getIntro() {
            return intro;
        }

        public void setIntro(String intro) {
            this.intro = intro;
        }

        public String getRows() {
            return rows;
        }

        public void setRows(String rows) {
            this.rows = rows;
        }

        public String getCourse() {
            return course;
        }

        public void setCourse(String course) {
            this.course = course;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public String getSchool() {
            return school;
        }

        public void setSchool(String school) {
            this.school = school;
        }

        public String getInvitecode() {
            return invitecode;
        }

        public void setInvitecode(String invitecode) {
            this.invitecode = invitecode;
        }

        public String getRid() {
            return rid;
        }

        public void setRid(String rid) {
            this.rid = rid;
        }

        public String getPage() {
            return page;
        }

        public void setPage(String page) {
            this.page = page;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getRole() {
            return role;
        }

        public void setRole(int role) {
            this.role = role;
        }

        public String getGrade() {
            return grade;
        }

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public Integer getGradeid() {
            return gradeid;
        }

        public void setGradeid(int gradeid) {
            this.gradeid = gradeid;
        }

        public TeacherBean getTeacher() {
            return teacher;
        }

        public void setTeacher(TeacherBean teacher) {
            this.teacher = teacher;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public static class TeacherBean implements Parcelable {
            /**
             * id : 6
             * tcard : 2222
             * recimg :
             * status : 1
             * stars :
             * ptime : 阿道夫
             * tcardimg :
             * qq : 111
             * intro : 嗯嗯
             */

            private int id;
            private String tcard;
            private String recimg;
            private int status;
            private String stars;
            private String ptime;
            private String tcardimg;
            private String qq;
            private String intro;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getTcard() {
                return tcard;
            }

            public void setTcard(String tcard) {
                this.tcard = tcard;
            }

            public String getRecimg() {
                return recimg;
            }

            public void setRecimg(String recimg) {
                this.recimg = recimg;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getStars() {
                return stars;
            }

            public void setStars(String stars) {
                this.stars = stars;
            }

            public String getPtime() {
                return ptime;
            }

            public void setPtime(String ptime) {
                this.ptime = ptime;
            }

            public String getTcardimg() {
                return tcardimg;
            }

            public void setTcardimg(String tcardimg) {
                this.tcardimg = tcardimg;
            }

            public String getQq() {
                return qq;
            }

            public void setQq(String qq) {
                this.qq = qq;
            }

            public String getIntro() {
                return intro;
            }

            public void setIntro(String intro) {
                this.intro = intro;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.id);
                dest.writeString(this.tcard);
                dest.writeString(this.recimg);
                dest.writeInt(this.status);
                dest.writeString(this.stars);
                dest.writeString(this.ptime);
                dest.writeString(this.tcardimg);
                dest.writeString(this.qq);
                dest.writeString(this.intro);
            }

            public TeacherBean() {
            }

            protected TeacherBean(Parcel in) {
                this.id = in.readInt();
                this.tcard = in.readString();
                this.recimg = in.readString();
                this.status = in.readInt();
                this.stars = in.readString();
                this.ptime = in.readString();
                this.tcardimg = in.readString();
                this.qq = in.readString();
                this.intro = in.readString();
            }

            public static final Creator<TeacherBean> CREATOR = new Creator<TeacherBean>() {
                @Override
                public TeacherBean createFromParcel(Parcel source) {
                    return new TeacherBean(source);
                }

                @Override
                public TeacherBean[] newArray(int size) {
                    return new TeacherBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.total);
            dest.writeInt(this.sex);
            dest.writeString(this.weight);
            dest.writeString(this.cardimg);
            dest.writeString(this.nickname);
            dest.writeString(this.cardnum);
            dest.writeString(this.rname);
            dest.writeString(this.sessionid);
            dest.writeString(this.passWord);
            dest.writeString(this.header);
            dest.writeString(this.intro);
            dest.writeString(this.rows);
            dest.writeString(this.course);
            dest.writeInt(this.id);
            dest.writeLong(this.time);
            dest.writeString(this.school);
            dest.writeString(this.invitecode);
            dest.writeString(this.rid);
            dest.writeString(this.page);
            dest.writeInt(this.age);
            dest.writeString(this.name);
            dest.writeInt(this.role);
            dest.writeString(this.grade);
            dest.writeInt(this.gradeid);
            dest.writeParcelable(this.teacher, flags);
            dest.writeString(this.mobile);
        }

        public UserBean() {
        }

        protected UserBean(Parcel in) {
            this.total = in.readString();
            this.sex = in.readInt();
            this.weight = in.readString();
            this.cardimg = in.readString();
            this.nickname = in.readString();
            this.cardnum = in.readString();
            this.rname = in.readString();
            this.sessionid = in.readString();
            this.passWord = in.readString();
            this.header = in.readString();
            this.intro = in.readString();
            this.rows = in.readString();
            this.course = in.readString();
            this.id = in.readInt();
            this.time = in.readLong();
            this.school = in.readString();
            this.invitecode = in.readString();
            this.rid = in.readString();
            this.page = in.readString();
            this.age = in.readInt();
            this.name = in.readString();
            this.role = in.readInt();
            this.grade = in.readString();
            this.gradeid = in.readInt();
            this.teacher = in.readParcelable(TeacherBean.class.getClassLoader());
            this.mobile = in.readString();
        }

        public static final Creator<UserBean> CREATOR = new Creator<UserBean>() {
            @Override
            public UserBean createFromParcel(Parcel source) {
                return new UserBean(source);
            }

            @Override
            public UserBean[] newArray(int size) {
                return new UserBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.msg);
        dest.writeParcelable(this.user, flags);
        dest.writeInt(this.status);
    }

    public User() {
    }

    protected User(Parcel in) {
        this.msg = in.readString();
        this.user = in.readParcelable(UserBean.class.getClassLoader());
        this.status = in.readInt();
    }

    public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
        @Override
        public User createFromParcel(Parcel source) {
            return new User(source);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };
}
